import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        singer: {}, 
        liuyan:{},
        radio:{}
    },
    mutations: {
        setSinger(state,singer){
            state.singer=singer
            sessionStorage.setItem("getsinger",JSON.stringify(singer))
        },
        setLiuyan(state,liuyan){
            state.liuyan=liuyan
        },
        setRadio(state,radio){
            state.radio=radio
        }
    },
    getters:{
        singer:state => state.singer,
        // singer:(state)=>{
        //     return state.singer
        // }
        liuyan:state => state.liuyan,
        radio:state => state.radio,
    },
    actions:{

    },
    modules:{

    }
  })
  export default store